#ifndef __CONFIGWIDGET_H__
#define __CONFIGWIDGET_H__

#include <QtGui/QHBoxLayout>
#include <QtGui/QTabWidget>

#include "configwidget_db.h"
#include "configwidget_pg.h"

namespace verema
{

class ConfigWidget : public QWidget
{

    Q_OBJECT

private:
    QHBoxLayout hbl_mainlayout;
    QTabWidget tab_tabwidget;

    ConfigWidget_Db cfg_db;
    ConfigWidget_Pg cfg_pg;

    QPoint m_mainWindowPosition;



public:
    ConfigWidget();

	void mainWindowPosition(QPoint mainWindowPosition)
	{
	    m_mainWindowPosition = mainWindowPosition;
    }

	QPoint mainWindowPosition()
	{
	    return(m_mainWindowPosition);
    }

    void show(int view);
    void reloadData();

    ~ConfigWidget() { }

signals:

    /**
     * \brief signal emitted if the config was changed and has to be reloaded
     */
    void configChanged();

public slots:

    /**
     * \brief slot for the subwidgets
     */
    void widgetChangedConfig()
    {
        emit configChanged();
    }
};

}

#endif // __CONFIGWIDGET_H__
